<%-- 
    Document   : register
    Created on : Nov 18, 2011, 8:45:41 PM
    Author     : Breath
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<!DOCTYPE html>
<f:view>
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
            <title>Register Page</title>
        </head>
        <body>
        <h:form id="registrationForm" > 
            <hr>
            <h:messages/>
            <fieldset>
                <h:outputLabel for="username" value="Username(*):"/>
                <h:inputText id="username" value="#{registrationBean.registeredUser.username}" required="true"/>
                <h:message for="username"/>
                <br/>
                <h:outputLabel for="steetName" value="Street Name(*):"/>
                <h:inputText id="streetName" value="#{registrationBean.registeredUser.streetName}" required="true"/>
                <h:message for="streetName"/>
                <br/>
                <h:outputLabel for="password" value="Password(*):"/>
                <h:inputSecret id="password" value="#{registrationBean.registeredUser.password}" required="true"/>
                <h:message for="password"/>
                <br/>
                <h:outputLabel for="zip" value="Zip(*):"/>
                <h:inputText id="zip" value="#{registrationBean.registeredUser.zip}" required="true"/>
                <h:message for="zip"/>
                <br/>
                <h:outputLabel for="surname" value="Surname(*):"/>
                <h:inputText value="#{registrationBean.registeredUser.surname}" id="surname" required="true"/>
                <h:message for="surname"/>
                <br/>
                <h:outputLabel for="userType" value="User Type(*):"/>
                <h:inputText id="userType" value="#{registrationBean.registeredUser.userType}" required="true"/>
                <h:message for="userType"/>
                <br/>
                <h:outputLabel for="email" value="Email(*):"/>
                <h:inputText id="email" value="#{registrationBean.registeredUser.email}" required="true"/>
                <h:message for="email"/>
                <br/>
                <h:outputLabel for="name" value="Name:"/>
                <h:inputText value="#{registrationBean.registeredUser.name}" id="name" required="true"/>
                <h:message for="name"/>
                <br/>
                <h:outputLabel for="website" value="Website:"/>
                <h:inputText id="website" value="#{registrationBean.registeredUser.website}"/>
                <h:message for="website"/>
            </fieldset>
            <hr>
            <h:commandButton value="Register" action="#{registrationBean.persistRegisteredUser}"/>
            <h:commandButton value="Cancel"  action="showIndex"/>
            <hr>
        </h:form>
        </body>
    </html>
</f:view>
